﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QuickManager.UI
{
    public partial class TextInputForm : Form
    {
        private string title;
        private string fieldName;
        public TextInputForm(string title, string fieldName)
        {
            this.title = title;
            this.fieldName = fieldName;

            InitializeComponent();
        }

        private void TextInputForm_Load(object sender, EventArgs e)
        {
            this.Text = title;
            this.label1.Text = fieldName;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Tag = this.textBox1.Text;
            this.Close();
        }

        private void TextInputForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Dispose();
        }
    }
}
